//
// Language.swift
// Ignite
// https://www.github.com/twostraws/Ignite
// See LICENSE for license information.
//

// It's difficult to find a list of actual language codes
// supported in web pages, so the list below is a composite
// of several sources in order to provide maximum flexibility.
// You'd think that RFC 5646 would be important enough to list
// all these somewhere, but apparently not!
// Source 1: https://stackoverflow.com/questions/3217492
// Source 2: https://stackoverflow.com/questions/3191664
// Source 3: https://loc.gov/standards/iso639-2/ISO-639-2_utf-8.txt

// swiftlint:disable type_body_length
/// An enum providing RFC-5646 language codes used for web pages.
public enum Language: String, Sendable {
    case abkhaz = "ab"
    case afar = "aa"
    case afrikaans = "af"
    case akan = "ak"
    case albanian = "sq"
    case amharic = "am"
    case arabic = "ar"
    case arabicAlgeria = "ar-DZ"
    case arabicBahrain = "ar-BH"
    case arabicEgypt = "ar-EG"
    case arabicIraq = "ar-IQ"
    case arabicJordan = "ar-JO"
    case arabicKuwait = "ar-KW"
    case arabicLebanon = "ar-LB"
    case arabicLibya = "ar-LY"
    case arabicMorocco = "ar-MA"
    case arabicOman = "ar-OM"
    case arabicQatar = "ar-QA"
    case arabicSaudiArabia = "ar-SA"
    case arabicSyria = "ar-SY"
    case arabicTunisia = "ar-TN"
    case arabicUAE = "ar-AE"
    case arabicYemen = "ar-YE"
    case aragonese = "an"
    case armenian = "hy"
    case assamese = "as"
    case avaric = "av"
    case avestan = "ae"
    case aymara = "ay"
    case azerbaijani = "az"
    case bambara = "bm"
    case bashkir = "ba"
    case basque = "eu"
    case belarusian = "be"
    case bengali = "bn"
    case bihari = "bh"
    case bislama = "bi"
    case bosnian = "bs"
    case breton = "br"
    case bulgarian = "bg"
    case burmese = "my"
    case catalan = "ca"
    case chamorro = "ch"
    case chechen = "ce"
    case chichewa, chewa, nyanja = "ny"
    case chinese = "zh"
    case chineseSimplified = "zh-CN"
    case chineseTraditional = "zh-TW"
    case chuvash = "cv"
    case cornish = "kw"
    case corsican = "co"
    case cree = "cr"
    case croatian = "hr"
    case czech = "cs"
    case danish = "da"
    case divehi, dhivehi, maldivian = "dv"
    case dutch = "nl"
    case dutchBelgium = "nl-BE"
    case dutchNetherlands = "nl-NL"
    case dzongkha = "dz"
    case english = "en"
    case englishAustralia = "en-AU"
    case englishBelize = "en-BZ"
    case englishCanada = "en-CA"
    case englishCaribbean = "en-CB"
    case englishIreland = "en-IE"
    case englishJamaica = "en-JM"
    case englishNewZealand = "en-NZ"
    case englishPhilippines = "en-PH"
    case englishSouthAfrica = "en-ZA"
    case englishTrinidadAndTobago = "en-TT"
    case englishUnitedKingdom = "en-GB"
    case englishUnitedStates = "en-US"
    case englishZimbabwe = "en-ZW"
    case esperanto = "eo"
    case estonian = "et"
    case ewe = "ee"
    case faroese = "fo"
    case fijian = "fj"
    case finnish = "fi"
    case french = "fr"
    case frenchBelgium = "fr-BE"
    case frenchCanada = "fr-CA"
    case frenchFrance = "fr-FR"
    case frenchLuxembourg = "fr-LU"
    case frenchMonaco = "fr-MC"
    case frenchSwitzerland = "fr-CH"
    case fula, fulah, pulaar, pular = "ff"
    case galician = "gl"
    case ganda = "lg"
    case georgian = "ka"
    case german = "de"
    case germanAustria = "de-AT"
    case germanSwitzerland = "de-CH"
    case germanGermany = "de-DE"
    case germanLiechtenstein = "de-LI"
    case germanLuxembourg = "de-LU"
    case greek = "el"
    case guarani = "gn"
    case gujarati = "gu"
    case haitian = "ht"
    case hausa = "ha"
    case hebrew = "he"
    case herero = "hz"
    case hindi = "hi"
    case hiriMotu = "ho"
    case hungarian = "hu"
    case icelandic = "is"
    case ido = "io"
    case igbo = "ig"
    case indonesian = "id"
    case interlingua = "ia"
    case interlingue = "ie"
    case inuktitut = "iu"
    case inupiaq = "ik"
    case irish = "ga"
    case italian = "it"
    case italianSwitzerland = "it-CH"
    case italianItaly = "it-IT"
    case japanese = "ja"
    case javanese = "jv"
    case kalaallisut, greenlandic = "kl"
    case kannada = "kn"
    case kanuri = "kr"
    case kashmiri = "ks"
    case kazakh = "kk"
    case khmer = "km"
    case kikuyu, gikuyu = "ki"
    case kinyarwanda = "rw"
    case kirundi = "rn"
    case komi = "kv"
    case kongo = "kg"
    case korean = "ko"
    case kurdish = "ku"
    case kwanyama, kuanyama = "kj"
    case kyrgyz = "ky"
    case lao = "lo"
    case latin = "la"
    case latvian = "lv"
    case limburgish = "li"
    case lingala = "ln"
    case lithuanian = "lt"
    case lubaKatanga = "lu"
    case luxembourgish, letzeburgesch = "lb"
    case macedonian = "mk"
    case malagasy = "mg"
    case malay = "ms"
    case malayBrunei = "ms-BN"
    case malayMalaysia = "ms-MY"
    case malayalam = "ml"
    case maltese = "mt"
    case manx = "gv"
    case maori = "mi"
    case marathi = "mr"
    case marshallese = "mh"
    case mongolian = "mn"
    case nauru = "na"
    case navajo = "nv"
    case ndonga = "ng"
    case nepali = "ne"
    case northernSami = "se"
    case northNdebele = "nd"
    case norwegian = "no"
    case norwegianBokmal = "nb"
    case norwegianNynorsk = "nn"
    case nuosu = "ii"
    case occitan = "oc"
    case ojibwe, ojibwa = "oj"
    case oldChurchSlavonic,
         churchSlavonic,
         oldBulgarian,
         oldChurchSlavic,
         oldSlavonic = "cu"
    case oriya = "or"
    case oromo = "om"
    case ossetian, ossetic = "os"
    case pali = "pi"
    case panjabi, punjabi = "pa"
    case pashto, pushto = "ps"
    case persian = "fa"
    case polish = "pl"
    case portuguese = "pt"
    case portugueseBrazil = "pt-BR"
    case portuguesePortugal = "pt-PT"
    case quechua = "qu"
    case romanian, moldavian, moldovan = "ro"
    case romansh = "rm"
    case russian = "ru"
    case samoan = "sm"
    case sango = "sg"
    case sanskrit = "sa"
    case sardinian = "sc"
    case scottishGaelic, gaelic = "gd"
    case serbian = "sr"
    case shona = "sn"
    case sindhi = "sd"
    case sinhala, sinhalese = "si"
    case slovak = "sk"
    case slovene = "sl"
    case somali = "so"
    case southernSotho = "st"
    case southNdebele = "nr"
    case spanish = "es"
    case spanishArgentina = "es-AR"
    case spanishBolivia = "es-BO"
    case spanishChile = "es-CL"
    case spanishColombia = "es-CO"
    case spanishCostaRica = "es-CR"
    case spanishDominicanRepublic = "es-DO"
    case spanishEcuador = "es-EC"
    case spanishSpain = "es-ES"
    case spanishGuatemala = "es-GT"
    case spanishHonduras = "es-HN"
    case spanishMexico = "es-MX"
    case spanishNicaragua = "es-NI"
    case spanishPanama = "es-PA"
    case spanishPeru = "es-PE"
    case spanishPuertoRico = "es-PR"
    case spanishParaguay = "es-PY"
    case spanishElSalvador = "es-SV"
    case spanishUruguay = "es-UY"
    case spanishVenezuela = "es-VE"
    case sundanese = "su"
    case swahili = "sw"
    case swati = "ss"
    case swedish = "sv"
    case swedishFinland = "sv-FI"
    case swedishSweden = "sv-SE"
    case tagalog = "tl"
    case tahitian = "ty"
    case tajik = "tg"
    case tamil = "ta"
    case tatar = "tt"
    case telugu = "te"
    case thai = "th"
    case tibetan = "bo"
    case tigrinya = "ti"
    case tongan = "to"
    case tsonga = "ts"
    case tswana = "tn"
    case turkish = "tr"
    case turkmen = "tk"
    case twi = "tw"
    case ukrainian = "uk"
    case urdu = "ur"
    case uyghur, uighur = "ug"
    case uzbek = "uz"
    case venda = "ve"
    case vietnamese = "vi"
    case volapuk = "vo"
    case walloon = "wa"
    case welsh = "cy"
    case westernFrisian = "fy"
    case wolof = "wo"
    case xhosa = "xh"
    case yiddish = "yi"
    case yoruba = "yo"
    case zhuang, chuang = "za"
    case zulu = "zu"
}
// swiftlint:enable type_body_length

extension Language: CaseIterable {}
